﻿@{
    ViewData["Title"] = "Create";
}


    <form class="layui-form" action="" style="width:95%" lay-filter="form-create">
        <div class="layui-form-item">
            <label class="layui-form-label">采集频率(毫秒)</label>
            <div class="layui-input-block">
                <input type="text" name="frequency" lay-verify="required|number" autocomplete="off" placeholder="请输入采集频率" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">最大失败次数</label>
            <div class="layui-input-block">
                <input type="text" name="maxErrorTimes" lay-verify="required|number" autocomplete="off" placeholder="请输入最大失败次数" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">多线程数量</label>
            <div class="layui-input-block">
                <input type="text" name="mutiTaskCount" lay-verify="required|number" autocomplete="off" placeholder="请输入多线程数量" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">最大失败重试次数</label>
            <div class="layui-input-block">
                <input type="text" name="maxReCollectTimes" lay-verify="required|number" autocomplete="off" placeholder="请输入最大失败重试次数" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-hide">
            <input type="button" lay-submit lay-filter="submit" id="submit" value="确认">
        </div>
        <div class="layui-form-item layui-hide">
            <input type="text" name="id" value="确认">
        </div>
        @Html.AntiForgeryToken()
    </form>
@section Scripts{
    <script>
        layui.use(['form'], function () {
            var form = layui.form;
            var $ = layui.jquery
            console.log(form)

            $.get('@Url.Action("Details","TerminalConfig")?id=' + getRequest().id, {}, function (res) {
                if (res.code == 0) {
                    var data = res.data;
                    form.val('form-create',data)
                }
                else {
                    layer.alert(res.msg);
                }
            });
        });
    </script>
}
